package com.mingqijia.gassafety.shared.constant;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * @author zhangfei
 * @version 1.0.0
 * @ClassName DtuPushTypeEnum.java
 * @Description TODO
 * @createTime 2023年12月20日
 */
@Getter
@RequiredArgsConstructor
public enum ReportTypeEnum {

    REPORT_0(0,0,0),
    REPORT_1(0,1, 1),
    REPORT_2(0,2,2),
    REPORT_3(1,1,3),
    REPORT_4(1,2,4),
    REPORT_5(1,0,5);




    private final int offline;
    private final int alarm;
    private final int status;


    public static ReportTypeEnum getPushTypes(int alarm,int offline) {
        for (ReportTypeEnum dtuPushTypeEnum : ReportTypeEnum.values()) {
            if (dtuPushTypeEnum.getAlarm()==(alarm)&&dtuPushTypeEnum.getOffline()==offline)
                return dtuPushTypeEnum;
        }
        return null;
    }

}
